/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package sirafia;

import com.sun.data.provider.impl.CachedRowSetDataProvider;
import com.sun.rave.web.ui.appbase.AbstractPageBean;
import com.sun.sql.rowset.CachedRowSetXImpl;
import com.sun.webui.jsf.component.Button;
import com.sun.webui.jsf.component.DropDown;
import com.sun.webui.jsf.component.ImageHyperlink;
import com.sun.webui.jsf.component.Label;
import com.sun.webui.jsf.component.PanelLayout;
import com.sun.webui.jsf.component.TextField;
import com.sun.webui.jsf.model.DefaultTableDataProvider;
import com.sun.webui.jsf.model.SingleSelectOptionsList;
import java.io.FileInputStream;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.faces.FacesException;
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
import javax.faces.convert.IntegerConverter;
import javax.faces.event.ValueChangeEvent;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import net.sf.jasperreports.engine.JRExporter;
import sirafia_clases.Conexion;

/**
 * <p>Page bean that corresponds to a similarly named JSP page.  This
 * class contains component definitions (and initialization code) for
 * all components that you have defined on this page, as well as
 * lifecycle methods and event handlers where you may add behavior
 * to respond to incoming events.</p>
 *
 * @version consultaAcuerdos.java
 * @version Created on 06-16-2012, 10:30:43 AM
 * @author Esparta86
 */

public class consultaAcuerdos extends AbstractPageBean {
    // <editor-fold defaultstate="collapsed" desc="Managed Component Definition">

    /**
     * <p>Automatically managed component initialization.  <strong>WARNING:</strong>
     * This method is automatically generated, so any user-specified code inserted
     * here is subject to being replaced.</p>
     */
    private void _init() throws Exception {
        dropDownAreaAcuerdo1DefaultOptions.setOptions(new com.sun.webui.jsf.model.Option[]{});
        dropDown2DefaultOptions.setOptions(new com.sun.webui.jsf.model.Option[]{new com.sun.webui.jsf.model.Option("item1", "XX ------ 40 ------ XX"), new com.sun.webui.jsf.model.Option("item2", "Junta de Academica"), new com.sun.webui.jsf.model.Option("item3", "Junta de Funcionamiento de la Facultad"), new com.sun.webui.jsf.model.Option("value", "Junta Movimiento de Personal"), new com.sun.webui.jsf.model.Option("value", "Junta de Varios"), new com.sun.webui.jsf.model.Option("value", "Referencias Secretaria")});
        dropDown3DefaultOptions.setOptions(new com.sun.webui.jsf.model.Option[]{new com.sun.webui.jsf.model.Option("item1", "XX ------  40  ------ XX"), new com.sun.webui.jsf.model.Option("item2", "Junta de Academica"), new com.sun.webui.jsf.model.Option("item3", "Junta de Funcionamiento de la Facultad"), new com.sun.webui.jsf.model.Option("value", "Junta Movimiento de Personal"), new com.sun.webui.jsf.model.Option("value", "Junta de Varios"), new com.sun.webui.jsf.model.Option("value", "Referencias Secretaria")});
        dropDown4DefaultOptions.setOptions(new com.sun.webui.jsf.model.Option[]{new com.sun.webui.jsf.model.Option("item1", "XX ------ 40  ------ XX"), new com.sun.webui.jsf.model.Option("item2", "Junta de Academica"), new com.sun.webui.jsf.model.Option("item3", "Junta de Funcionamiento de la Facultad"), new com.sun.webui.jsf.model.Option("value", "Junta Movimiento de Personal"), new com.sun.webui.jsf.model.Option("value", "Junta de Varios"), new com.sun.webui.jsf.model.Option("value", "Referencias Secretaria")});
        dropDown5DefaultOptions.setOptions(new com.sun.webui.jsf.model.Option[]{new com.sun.webui.jsf.model.Option("item1", "XX ------ 40 ------ XX"), new com.sun.webui.jsf.model.Option("item2", "Junta de Academica"), new com.sun.webui.jsf.model.Option("item3", "Junta de Funcionamiento de la Facultad"), new com.sun.webui.jsf.model.Option("value", "Junta Movimiento de Personal"), new com.sun.webui.jsf.model.Option("value", "Junta de Varios"), new com.sun.webui.jsf.model.Option("value", "Referencias Secretaria")});
        dropDown6DefaultOptions.setOptions(new com.sun.webui.jsf.model.Option[]{new com.sun.webui.jsf.model.Option("item1", "XX ------ 40 ------ XX"), new com.sun.webui.jsf.model.Option("item2", "Junta de Academica"), new com.sun.webui.jsf.model.Option("item3", "Junta de Funcionamiento de la Facultad"), new com.sun.webui.jsf.model.Option("value", "Junta Movimiento de Personal"), new com.sun.webui.jsf.model.Option("value", "Junta de Varios"), new com.sun.webui.jsf.model.Option("value", "Referencias Secretaria")});
        dropDown7DefaultOptions.setOptions(new com.sun.webui.jsf.model.Option[]{new com.sun.webui.jsf.model.Option("item1", "XX ---------- 60 ---------- XX"), new com.sun.webui.jsf.model.Option("item2", "JD dia/mes/a\u00f1o - dia/mes/a\u00f1o"), new com.sun.webui.jsf.model.Option("item3", "JD dia/mes/a\u00f1o - dia/mes/a\u00f1o")});
        catareaDataProvider.setCachedRowSet((javax.sql.rowset.CachedRowSet) getValue("#{SessionBean1.catareaRowSet}"));
        catareaDataProvider1.setCachedRowSet((javax.sql.rowset.CachedRowSet) getValue("#{consultaAcuerdos.catareaRowSet}"));
        catareaRowSet.setDataSourceName("java:comp/env/jdbc/sirafia_PostgreSQL");
        catareaRowSet.setCommand("SELECT ALL sirafia.catarea.idarea, sirafia.catarea.nomarea  FROM sirafia.catarea");
        catareaRowSet.setTableName("catarea");
        acuerdoDataProvider.setCachedRowSet((javax.sql.rowset.CachedRowSet) getValue("#{SessionBean1.acuerdoRowSet}"));
        acuerdoDataProvider1.setCachedRowSet((javax.sql.rowset.CachedRowSet) getValue("#{consultaAcuerdos.acuerdoRowSet}"));
        acuerdoRowSet.setDataSourceName("java:comp/env/jdbc/sirafia_PostgreSQL");
        acuerdoRowSet.setCommand("SELECT * FROM sirafia.acuerdo");
        acuerdoRowSet.setTableName("acuerdo");
    }
    private SingleSelectOptionsList dropDownAreaAcuerdo1DefaultOptions = new SingleSelectOptionsList();

    public SingleSelectOptionsList getDropDownAreaAcuerdo1DefaultOptions() {
        return dropDownAreaAcuerdo1DefaultOptions;
    }

    public void setDropDownAreaAcuerdo1DefaultOptions(SingleSelectOptionsList ssol) {
        this.dropDownAreaAcuerdo1DefaultOptions = ssol;
    }
    private DefaultTableDataProvider defaultTableDataProvider = new DefaultTableDataProvider();

    public DefaultTableDataProvider getDefaultTableDataProvider() {
        return defaultTableDataProvider;
    }

    public void setDefaultTableDataProvider(DefaultTableDataProvider dtdp) {
        this.defaultTableDataProvider = dtdp;
    }
    private SingleSelectOptionsList dropDown2DefaultOptions = new SingleSelectOptionsList();

    public SingleSelectOptionsList getDropDown2DefaultOptions() {
        return dropDown2DefaultOptions;
    }

    public void setDropDown2DefaultOptions(SingleSelectOptionsList ssol) {
        this.dropDown2DefaultOptions = ssol;
    }
    private SingleSelectOptionsList dropDown3DefaultOptions = new SingleSelectOptionsList();

    public SingleSelectOptionsList getDropDown3DefaultOptions() {
        return dropDown3DefaultOptions;
    }

    public void setDropDown3DefaultOptions(SingleSelectOptionsList ssol) {
        this.dropDown3DefaultOptions = ssol;
    }
    private SingleSelectOptionsList dropDown4DefaultOptions = new SingleSelectOptionsList();

    public SingleSelectOptionsList getDropDown4DefaultOptions() {
        return dropDown4DefaultOptions;
    }

    public void setDropDown4DefaultOptions(SingleSelectOptionsList ssol) {
        this.dropDown4DefaultOptions = ssol;
    }
    private SingleSelectOptionsList dropDown5DefaultOptions = new SingleSelectOptionsList();

    public SingleSelectOptionsList getDropDown5DefaultOptions() {
        return dropDown5DefaultOptions;
    }

    public void setDropDown5DefaultOptions(SingleSelectOptionsList ssol) {
        this.dropDown5DefaultOptions = ssol;
    }
    private SingleSelectOptionsList dropDown6DefaultOptions = new SingleSelectOptionsList();

    public SingleSelectOptionsList getDropDown6DefaultOptions() {
        return dropDown6DefaultOptions;
    }

    public void setDropDown6DefaultOptions(SingleSelectOptionsList ssol) {
        this.dropDown6DefaultOptions = ssol;
    }
    private SingleSelectOptionsList dropDown7DefaultOptions = new SingleSelectOptionsList();

    public SingleSelectOptionsList getDropDown7DefaultOptions() {
        return dropDown7DefaultOptions;
    }

    public void setDropDown7DefaultOptions(SingleSelectOptionsList ssol) {
        this.dropDown7DefaultOptions = ssol;
    }
    private TextField txtAnio = new TextField();

    public TextField getTxtAnio() {
        return txtAnio;
    }

    public void setTxtAnio(TextField tf) {
        this.txtAnio = tf;
    }
    private PanelLayout panelInfAcuerdo1 = new PanelLayout();

    public PanelLayout getPanelInfAcuerdo1() {
        return panelInfAcuerdo1;
    }

    public void setPanelInfAcuerdo1(PanelLayout pl) {
        this.panelInfAcuerdo1 = pl;
    }
    private Label labErrorAnio = new Label();

    public Label getLabErrorAnio() {
        return labErrorAnio;
    }

    public void setLabErrorAnio(Label l) {
        this.labErrorAnio = l;
    }
    private Label labprueba = new Label();

    public Label getLabprueba() {
        return labprueba;
    }

    public void setLabprueba(Label l) {
        this.labprueba = l;
    }
    private DropDown dropDownAreaAcuerdo1 = new DropDown();

    public DropDown getDropDownAreaAcuerdo1() {
        return dropDownAreaAcuerdo1;
    }

    public void setDropDownAreaAcuerdo1(DropDown dd) {
        this.dropDownAreaAcuerdo1 = dd;
    }
    private CachedRowSetDataProvider catareaDataProvider = new CachedRowSetDataProvider();

    public CachedRowSetDataProvider getCatareaDataProvider() {
        return catareaDataProvider;
    }

    public void setCatareaDataProvider(CachedRowSetDataProvider crsdp) {
        this.catareaDataProvider = crsdp;
    }
    private CachedRowSetDataProvider catareaDataProvider1 = new CachedRowSetDataProvider();

    public CachedRowSetDataProvider getCatareaDataProvider1() {
        return catareaDataProvider1;
    }

    public void setCatareaDataProvider1(CachedRowSetDataProvider crsdp) {
        this.catareaDataProvider1 = crsdp;
    }
    private CachedRowSetXImpl catareaRowSet = new CachedRowSetXImpl();

    public CachedRowSetXImpl getCatareaRowSet() {
        return catareaRowSet;
    }

    public void setCatareaRowSet(CachedRowSetXImpl crsxi) {
        this.catareaRowSet = crsxi;
    }
    private IntegerConverter dropDownAreaAcuerdo1Converter = new IntegerConverter();

    public IntegerConverter getDropDownAreaAcuerdo1Converter() {
        return dropDownAreaAcuerdo1Converter;
    }

    public void setDropDownAreaAcuerdo1Converter(IntegerConverter ic) {
        this.dropDownAreaAcuerdo1Converter = ic;
    }
    private CachedRowSetDataProvider acuerdoDataProvider = new CachedRowSetDataProvider();

    public CachedRowSetDataProvider getAcuerdoDataProvider() {
        return acuerdoDataProvider;
    }

    public void setAcuerdoDataProvider(CachedRowSetDataProvider crsdp) {
        this.acuerdoDataProvider = crsdp;
    }
    private CachedRowSetDataProvider acuerdoDataProvider1 = new CachedRowSetDataProvider();

    public CachedRowSetDataProvider getAcuerdoDataProvider1() {
        return acuerdoDataProvider1;
    }

    public void setAcuerdoDataProvider1(CachedRowSetDataProvider crsdp) {
        this.acuerdoDataProvider1 = crsdp;
    }
    private CachedRowSetXImpl acuerdoRowSet = new CachedRowSetXImpl();

    public CachedRowSetXImpl getAcuerdoRowSet() {
        return acuerdoRowSet;
    }

    public void setAcuerdoRowSet(CachedRowSetXImpl crsxi) {
        this.acuerdoRowSet = crsxi;
    }
    private ImageHyperlink imageHyperlinkAcuerdos1 = new ImageHyperlink();

    public ImageHyperlink getImageHyperlinkAcuerdos1() {
        return imageHyperlinkAcuerdos1;
    }

    public void setImageHyperlinkAcuerdos1(ImageHyperlink ih) {
        this.imageHyperlinkAcuerdos1 = ih;
    }

    // </editor-fold>

    /**
     * <p>Construct a new Page bean instance.</p>
     */
    public consultaAcuerdos() {
    }

    /**
     * <p>Callback method that is called whenever a page is navigated to,
     * either directly via a URL, or indirectly via page navigation.
     * Customize this method to acquire resources that will be needed
     * for event handlers and lifecycle methods, whether or not this
     * page is performing post back processing.</p>
     * 
     * <p>Note that, if the current request is a postback, the property
     * values of the components do <strong>not</strong> represent any
     * values submitted with this request.  Instead, they represent the
     * property values that were saved for this view when it was rendered.</p>
     */
    @Override
    public void init() {
        // Perform initializations inherited from our superclass
        super.init();
        // Perform application initialization that must complete
        // *before* managed components are initialized
        // TODO - add your own initialiation code here
        
        // <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
        // Initialize automatically managed components
        // *Note* - this logic should NOT be modified
        try {
            _init();
        } catch (Exception e) {
            log("consultaAcuerdos Initialization Failure", e);
            throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
        }
        
        // </editor-fold>
        // Perform application initialization that must complete
        // *after* managed components are initialized
        // TODO - add your own initialization code here
    }

    /**
     * <p>Callback method that is called after the component tree has been
     * restored, but before any event processing takes place.  This method
     * will <strong>only</strong> be called on a postback request that
     * is processing a form submit.  Customize this method to allocate
     * resources that will be required in your event handlers.</p>
     */
    @Override
    public void preprocess() {
    }

    /**
     * <p>Callback method that is called just before rendering takes place.
     * This method will <strong>only</strong> be called for the page that
     * will actually be rendered (and not, for example, on a page that
     * handled a postback and then navigated to a different page).  Customize
     * this method to allocate resources that will be required for rendering
     * this page.</p>
     */
    @Override
    public void prerender() {
    }

    /**
     * <p>Callback method that is called after rendering is completed for
     * this request, if <code>init()</code> was called (regardless of whether
     * or not this was the page that was actually rendered).  Customize this
     * method to release resources acquired in the <code>init()</code>,
     * <code>preprocess()</code>, or <code>prerender()</code> methods (or
     * acquired during execution of an event handler).</p>
     */
    @Override
    public void destroy() {
        catareaDataProvider.close();
        catareaDataProvider1.close();
        acuerdoDataProvider.close();
        acuerdoDataProvider1.close();
    }

    /**
     * <p>Return a reference to the scoped data bean.</p>
     *
     * @return reference to the scoped data bean
     */
    protected SessionBean1 getSessionBean1() {
        return (SessionBean1) getBean("SessionBean1");
    }

    /**
     * <p>Return a reference to the scoped data bean.</p>
     *
     * @return reference to the scoped data bean
     */
    protected RequestBean1 getRequestBean1() {
        return (RequestBean1) getBean("RequestBean1");
    }

    /**
     * <p>Return a reference to the scoped data bean.</p>
     *
     * @return reference to the scoped data bean
     */
    protected ApplicationBean1 getApplicationBean1() {
        return (ApplicationBean1) getBean("ApplicationBean1");
    }

    public String tab7_action() {
        // TODO: Process the action. Return value is a navigation
        // case name where null will return to the same page.
        return null;
    }

    public String tab4_action() {
        // TODO: Process the action. Return value is a navigation
        // case name where null will return to the same page.
        return null;
    }

    public String tab1_action() {
        // TODO: Process the action. Return value is a navigation
        // case name where null will return to the same page.
        return null;
    }

    public String btnImprimirA1_action() {
        // TODO: Process the action. Return value is a navigation
        // case name where null will return to the same page.
      return "case1";
    }


    public void generarReporte(int tipoReport,String url) throws SQLException, ClassNotFoundException {
        // TODO: Process the action. Return value is a navigation
        // case name where null will return to the same page.
        //prueba para generar reportes


        Connection conn = null;
        try {
            conn = (Connection) Conexion.conector();
        } catch (Exception ex) {
            Logger.getLogger(consultaAcuerdos.class.getName()).log(Level.SEVERE, null, ex);
        }
        ExternalContext econtext = getExternalContext();

        //InputStream inputStream = RegAcuerdo.class.getResourceAsStream("C:/Users/dell/Desktop/DOCUMENTACION/ACTAS/Acta_2_2012.pdf");

        //if (inputStream == null) {
        //throw new ClassNotFoundException("Archivo R_Ingreso_ConsumoAli.jasper no se encontró");
        //}
        FacesContext fcontext = FacesContext.getCurrentInstance();
        try {
            //parametros del reporte
            //String prod = dropDown1.getValue().toString();
            Map parameters = new HashMap();
            parameters.put("", "");


            JRExporter exporter = null;

            //JasperPrint jasperPrint = JasperFillManager.fillReport(inputStream, parameters, conn);
            HttpServletResponse response = (HttpServletResponse) econtext.getResponse();

            HttpServletRequest request = (HttpServletRequest) econtext.getRequest();

            if (tipoReport == 1) {


                FileInputStream ficheroInput = new FileInputStream(url);
                int tamanoInput = ficheroInput.available();
                byte[] datosPDF = new byte[tamanoInput];
                ficheroInput.read(datosPDF, 0, tamanoInput);

                response.setHeader("Content-disposition", "filename=ACUERDO.pdf");
                response.setContentType("application/pdf");
                //response.setContentLength(tamanoInput);
                response.getOutputStream().write(datosPDF);

                ficheroInput.close();

            }



            if (exporter != null) {
                exporter.exportReport();
            }
        } catch (Exception ex) {
            Logger.getLogger(ApplicationBean1.class.getName()).log(Level.SEVERE, null, ex);
            System.out.println(ex.getMessage().toString());
            throw new FacesException(ex);
        } finally {
            conn.close();
        }
        fcontext.responseComplete();

    }

    public String imageHyperlink1_action() {
        // TODO: Process the action. Return value is a navigation
        // case name where null will return to the same page.
        return null;
    }

  
    public String button2_action() {
        // TODO: Process the action. Return value is a navigation
        // case name where null will return to the same page.
        return null;
    }

    public String tab2_action() {
        // TODO: Process the action. Return value is a navigation
        // case name where null will return to the same page.
        return null;
    }

    public String button3_action() {
        // TODO: Process the action. Return value is a navigation
        // case name where null will return to the same page.
        return null;
    }

    public String button4_action() {
        // TODO: Process the action. Return value is a navigation
        // case name where null will return to the same page.
        return null;
    }

    public String imageHyperlink2_action() {
        // TODO: Process the action. Return value is a navigation
        // case name where null will return to the same page.
        return null;
    }

    public String button14_action() {
        // TODO: Process the action. Return value is a navigation
        // case name where null will return to the same page.
        return null;
    }

    public String button5_action() {
        // TODO: Process the action. Return value is a navigation
        // case name where null will return to the same page.
        return null;
    }

    public String button6_action() {
        // TODO: Process the action. Return value is a navigation
        // case name where null will return to the same page.
        return null;
    }

    public String imageHyperlink3_action() {
        // TODO: Process the action. Return value is a navigation
        // case name where null will return to the same page.
        return null;
    }

    public String button15_action() {
        // TODO: Process the action. Return value is a navigation
        // case name where null will return to the same page.
        return null;
    }

    public String tab5_action() {
        // TODO: Process the action. Return value is a navigation
        // case name where null will return to the same page.
        return null;
    }

    public String button7_action() {
        // TODO: Process the action. Return value is a navigation
        // case name where null will return to the same page.
        return null;
    }

    public String button8_action() {
        // TODO: Process the action. Return value is a navigation
        // case name where null will return to the same page.
        return null;
    }

    public String imageHyperlink4_action() {
        // TODO: Process the action. Return value is a navigation
        // case name where null will return to the same page.
        return null;
    }

    public String button21_action() {
        // TODO: Process the action. Return value is a navigation
        // case name where null will return to the same page.
        return null;
    }

    public String tab6_action() {
        // TODO: Process the action. Return value is a navigation
        // case name where null will return to the same page.
        return null;
    }

    public String button9_action() {
        // TODO: Process the action. Return value is a navigation
        // case name where null will return to the same page.
        return null;
    }

    public String button10_action() {
        // TODO: Process the action. Return value is a navigation
        // case name where null will return to the same page.
        return null;
    }

    public String imageHyperlink5_action() {
        // TODO: Process the action. Return value is a navigation
        // case name where null will return to the same page.
        return null;
    }

    public String button16_action() {
        // TODO: Process the action. Return value is a navigation
        // case name where null will return to the same page.
        return null;
    }

    public String tab3_action() {
        // TODO: Process the action. Return value is a navigation
        // case name where null will return to the same page.
        return null;
    }

    public String button11_action() {
        // TODO: Process the action. Return value is a navigation
        // case name where null will return to the same page.
        return null;
    }

    public String button12_action() {
        // TODO: Process the action. Return value is a navigation
        // case name where null will return to the same page.
        return null;
    }

    public String imageHyperlink6_action() {
        // TODO: Process the action. Return value is a navigation
        // case name where null will return to the same page.
        return null;
    }

    public String button17_action() {
        // TODO: Process the action. Return value is a navigation
        // case name where null will return to the same page.
        return null;
    }

    public String button18_action() {
        // TODO: Process the action. Return value is a navigation
        // case name where null will return to the same page.
        return null;
    }

    public String button19_action() {
        // TODO: Process the action. Return value is a navigation
        // case name where null will return to the same page.
        return null;
    }

    public String imageHyperlink7_action() {
        // TODO: Process the action. Return value is a navigation
        // case name where null will return to the same page.
        return null;
    }

    public String button20_action() {
        // TODO: Process the action. Return value is a navigation
        // case name where null will return to the same page.
        return null;
    }

    public String btnBuscarA1_action() {
        int anio = 0;
        try {
                anio = Integer.parseInt("" + txtAnio.getText());
                if (anio < 0) {
                    labErrorAnio.setText("El año debe ser un valor numerico");
                } else {
                    //Eecutar consulta

                    int id_area=Integer.parseInt(""+dropDownAreaAcuerdo1.getValue());
                    panelInfAcuerdo1.setVisible(true);
                    //labprueba.setText(""+id_area);
                    String String_sql="SELECT numeroacuerdo,anioacuer,diracuerdo FROM sirafia.ACUERDO WHERE anioacuer="+anio+" AND idarea="+id_area+"";
                     try{
                         acuerdoDataProvider.setCachedRowSet((javax.sql.rowset.CachedRowSet) getValue("#{SessionBean1.acuerdoRowSet}"));
                         acuerdoDataProvider1.setCachedRowSet((javax.sql.rowset.CachedRowSet) getValue("#{consultaAcuerdos.acuerdoRowSet}"));
                        acuerdoRowSet.setDataSourceName("java:comp/env/jdbc/sirafia_PostgreSQL");
                        acuerdoRowSet.setCommand(String_sql);
                        acuerdoRowSet.setTableName("acuerdo");
                        return null;
                } catch (SQLException ex) {
                    Logger.getLogger(consultaAcuerdos.class.getName()).log(Level.SEVERE, null, ex);
                }
              }//fin de else
            }catch (Exception e) {
                labErrorAnio.setText("El año debe ser un valor numerico");
                panelInfAcuerdo1.setVisible(false);
            }

        return null;
    }
      public String button1_action() {
        // TODO: Process the action. Return value is a navigation
        // case name where null will return to the same page.
       return null;
    }

    public String imageHyperlinkAcuerdos1_action() {
        // TODO: Process the action. Return value is a navigation
        // case name where null will return to the same page.
        String url =imageHyperlinkAcuerdos1.getText().toString();
        // labprueba.setText(url);
        try {
            // TODO: Process the action. Return value is a navigation
            // case name where null will return to the same page.
            generarReporte(1,url);
        } catch (SQLException ex) {
            Logger.getLogger(consultaAcuerdos.class.getName()).log(Level.SEVERE, null, ex);

        } catch (ClassNotFoundException ex) {
            Logger.getLogger(consultaAcuerdos.class.getName()).log(Level.SEVERE, null, ex);
        }
         
        return null;
    }


}

